/**
 * @author chenjuan
 * @create 2021-12-07
 * @description 全局路由控制文件
 */

import Vue from "vue"
import Router from 'vue-router'

Vue.use(Router)

//引入routes
import routes from './routes'

//引入hook函数
import hookFn from "./hook"

const router = new Router({
    mode: 'history',
  //配置路由
  routes,
})

//路由权限拦截
router.beforeEach(hookFn)

export default router
